<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="/WEB-INF/views/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
	<style type="text/css">
	</style>
  <script type="text/javascript">
	var datagrid;
	var rowEditor=undefined;
	var buttonFlag = null;
	$(function(){
		datagrid=$("#dg").datagrid({
			url:"${cs}/cs/credit/loanbid/list?state=3",//加载的URL
		    isField:"id",
			pagination:true,//显示分页
			pageSize:10,//分页大小
			pageList:[10,15,20],//每页的个数
			fit:true,//自动补全
			fitColumns:true,
			iconCls:"icon-save",//图标
			columns:[[      //每个列具体内容
		              {field:'id', hidden:true },   
		              {field:'title', title:'标名',width:"15%",align:'center' },
		              {field:'content', title:'内容',width:"20%",align:'center' },
		              {field:'publisherName', title:'发布者账户',width:"15%",align:'center' },
		              {field:'securityName', title:'担保账户',width:"15%",align:'center' },
		              {field:'money', title:'借款金额',width:"20%",align:'center' ,
		            	  formatter: function(val,row, index) {
			            		return "￥"+val;
			            	} 
		              },
		              {field:'months', title:'贷款期限',width:"20%",align:'center',
		            	  formatter: function(val,row, index) {
			            		return val+"个月";
			            	}   
		              }
		          ]],
			toolbar:[              //工具条
			        {text:"在未认证之前，您无权进行任何操作",iconCls:"icon-no",handler:function(){
			        	$.messager.alert('错误', "您还未认证！", 'error');
			        }}
			  ]
		});
		$("#btn_search").click(function(){
			var param = $("#searchForm").serializeJson();
			datagrid.datagrid('load', param);
		});
	});
	
    </script>
</head>
<body style="padding:0 4px; margin:0;  overflow: hidden; ">
<div class="easyui-layout" style="width:100%;height:100%;" data-options="fit:true">
		<div title="信贷管理" data-options="region:'north'" style="height:70px">
		 <form id="searchForm" >
			<table cellpadding="5">
				    		<tr>
				    			<td>贷款标名:</td>
				    			<td><input class="easyui-textbox" type="text"   name="title" ></input></td>
				    			<td>内容关键字:</td>
				    			<td><input class="easyui-textbox" type="text"   name="content" ></input></td>
				    			<td ><a href="#" id="btn_search" class="easyui-linkbutton" data-options="iconCls:'icon-search'" style="width:80px">Search</a></td>
				    		</tr>
				    	</table>
				  </form>
		</div>
		<div data-options="region:'center'" >
			<table id="dg" >
			</table>
		</div>
		</div>
</body>
</html>